package io.dy.bo;

import lombok.Data;

/**
 * @author : dmj
 * @date: 2024/6/3 10:09 上午
 * @description:
 */
@Data
public class StudentBO {

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 地址
     */
    private AddressBO address;

    /**
     * 所属班级
     */
    private GradeBO belongGrade;

    /**
     * 所属学校
     */
    private String belongSchool;


    public String addressDetail(AddressBO addressBO){
        if(addressBO == null){
            return "";
        }
        return addressBO.getCityName() + "@@" + addressBO.getCityCode();
    }
}
